package com.book.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.book.entity.Address;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface AddressMapper extends BaseMapper<Address> {

	//todo
	List<Address> query(Map<String,Object> params);

	@Update("update address set is_default = 0 where id = #{id}")
	void resetAddressDefault(@Param("id") String id);
}
